package com.dw.widget.slideshow.config.view.list;

import com.dw.widget.slideshow.R;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class ListItemIconView extends RelativeLayout {

	private Context mContext;
	private ImageView iconView;
	
	public ListItemIconView(Context context, AttributeSet attrs, int defStyle) {
		
		super(context, attrs, defStyle);
		mContext = context;
	}
	
	public ListItemIconView(Context context, AttributeSet attrs) {
		
		this(context, attrs, -1);
	}

	public ListItemIconView(Context context) {
		
		this(context, null);
	}

	@Override
	protected void onFinishInflate() {

		super.onFinishInflate();
		LayoutInflater.from(mContext).inflate(R.layout.listitem_icon, this, true);
		iconView = (ImageView)findViewById(R.id.listitemicon_icon);
	}
	
	public void setIcon(int resId)
	{
		iconView.setImageResource(resId);
	}

}
